package lesson.c3;

public class RunClass {

	public static void main(String[] args) {
		//child class use parent class method(public ,protected)
		Rectangle rect = new Rectangle(new Point(0, 0), new Point(1, 1));
		rect.whoAmI(); 
		rect.parentWhoAmI(); //super
		
		//override 方法重写
		Point p = new Point(1, 1);
		p.whoAmI();
		
		//overloading 方法重载
		Line ln = new Line(new Point(0, 0), new Point(2,2));
		ln.whoAmI();
		ln.whoAmI("TEST");
		ln.whoAmI("TEST2", 1);
	}	

}
